public class code3_1 {
    public int lowbit(int x) {
        return x&(-x);
    }
    //x&(-x)
    public int hammingDistance(int x, int y) {
        int ret = 0;
        for(int i=x^y;i>0;i-=lowbit(i)) {
            ret++;
        }
        return ret;
    }
}
